package com.ai.controller.made;


import com.ai.annotation.EnterPathParamLog;
import com.ai.entity.made.Slabs;
import com.ai.entity.made.page.SlabsPages;
import com.ai.service.made.ISlabsService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author chen
 * @since 2023-03-28 11:12:30
 */
@RestController
@RequestMapping("/slabs")
public class SlabsController {
    @Resource
    ISlabsService slabsService;

    @ApiOperation("分页查询")
    @PostMapping("list")
    @EnterPathParamLog
    public IPage<Slabs> list(@RequestBody SlabsPages slabsPages) {
        QueryWrapper<Slabs> queryWrapper = slabsPages.getQuery(new QueryWrapper<>());
        IPage<Slabs> iPage = slabsService.page(slabsPages, queryWrapper);
        return iPage;
    }
}

